import request from "@/utils/request";

// 个税人员库手动录入
export function saveInfo(data) {
  return request({
    url: "/tax/api/v1/employees/saveInfo",
    method: "post",
    data
  });
}

export function getEmployees(params) {
  return request({
    url: "/tax/api/v1/employees",
    method: "GET",
    params
  });
}

export function listByEmpId(empId) {
  return request({
    url: `/tax/api/v1/employeeRecords/selectByEmpId/${empId}`,
    method: "GET"
  });
}

export function getTaxCompanieslistAll(params) {
  return request({
    url: `/tax/api/v1/companyAuthorities/listAll`,
    method: "GET",
    params
  });
}
export function editEmployees(data) {
  return request({
    url: "/tax/api/v1/employees/updateIncludeNull",
    method: "put",
    data
  });
}
export function addEmployeeRecordsSaveRecord(data) {
  return request({
    url: "/tax/api/v1/employeeRecords/saveRecord",
    method: "post",
    data
  });
}
export function editEmployeeRecords(data) {
  return request({
    url: "/tax/api/v1/employeeRecords/updateIncludeNull",
    method: "put",
    data
  });
}
export function delEmployeeId(employeeId) {
  return request({
    url: `/tax/api/v1/employees/${employeeId}`,
    method: "DELETE"
  });
}
export function delEmployeeRecords(employeeId) {
  return request({
    url: `/tax/api/v1/employeeRecords/${employeeId}`,
    method: "DELETE"
  });
}

export function getCompanyAuthoritiesListAll(params) {
  return request({
    url: "/tax/api/v1/taxCompanies/listTree",
    method: "GET",
    params
  });
}
